With popularization of smart devices, more and more devices are equipped with a camera function. Generally, a rear surface of a device is equipped with a single-lens camera, or a front surface of a device is also equipped with another single-lens camera.
A common camera function includes an image preview function, that is, an image currently acquired by a lens is dynamically displayed on a built-in display or an external display of a device. For example, when a user is quite satisfied with a currently previewed image, the user may press a specific button, such as a hardware button equipped on the device or a button simulated by a photographing application, so as to give the device an instruction for a photographing operation. When receiving the instruction for the photographing operation, the device processes the currently previewed image to generate a photograph.
A multi-frame technology is a technical trend in a present photographing field. Multiple frames of images are obtained by means of multi-frame photographing, and the obtained multiple frames of images are synthesized using a synthesis algorithm, which can effectively improve photographing quality. A multi-frame technology of a single-lens camera has already been widely used in existing devices such as a camera and a mobile terminal. However, the single-lens camera can only collect multiple frames of images at different times, and in a process of collecting multiple frames of images, there is a jitter of the single-lens camera or a motion of a target object; therefore, when a synthesis algorithm is being performed on the multiple frames of images, in a case of a non-night scene, ghost detection needs to be performed and/or a compensation algorithm needs to be used to eliminate impact on the images caused by the jitter of the single-lens camera or the motion of the target object.